Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface System.​Numerics.​IBinaryNumber<​TSelf>

Assembly: System.Runtime

Implemented Interfaces

Defines a number that is represented in a base-2 format.

Properties

static TSelf
AllBitsSet
Gets an instance of the binary type in which all bits are set.

Methods

static bool
IsPow2​(TSelf value)
Determines if a value is a power of two.
Returns <see langword="true" /> if <paramref name="value" /> is a power of two; otherwise, <see langword="false" /> .
value The value to be checked.
static TSelf
Log2​(TSelf value)
Computes the log2 of a value.
Returns The log2 of <paramref name="value" /> .
value The value whose log2 is to be computed.